package org.acsis.jee.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;


public class Client implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 4243852063115390305L;
	private String civilite;
	private String nom;
	private String prenom;
	private Date dateNaissance;
	private String adressMail;
	
	private Date dateInscription;

	private transient String identifiant;

	private Long idClient;
	
	private transient Set<Trajet> trajets;
	
	public Client() {
	}
	
	public Client(String nom, String prenom) {
		this.nom = nom;
		this.prenom = prenom;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getCivilite()
	 */
	public String getCivilite() {
		return civilite;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setCivilite(java.lang.String)
	 */
	public void setCivilite(String civilite) {
		this.civilite = civilite;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getNom()
	 */
	public String getNom() {
		return nom;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setNom(java.lang.String)
	 */
	public void setNom(String nom) {
		this.nom = nom;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getPrenom()
	 */
	public String getPrenom() {
		return prenom;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setPrenom(java.lang.String)
	 */
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getDateNaissance()
	 */
	public Date getDateNaissance() {
		return dateNaissance;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setDateNaissance(java.util.Date)
	 */
	public void setDateNaissance(Date dateNaissance) {
		this.dateNaissance = dateNaissance;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getAdressMail()
	 */
	public String getAdressMail() {
		return adressMail;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setAdressMail(java.lang.String)
	 */
	public void setAdressMail(String adressMail) {
		this.adressMail = adressMail;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getDateInscription()
	 */
	public Date getDateInscription() {
		return dateInscription;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setDateInscription(java.util.Date)
	 */
	public void setDateInscription(Date dateInscription) {
		this.dateInscription = dateInscription;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getUtilisateur()
	 */
	public String getIdentifiant() {
		return identifiant;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setUtilisateur(org.acsis.jee.pojo.IUtilisateur)
	 */
	public void setIdentifiant(String utilisateur) {
		this.identifiant = utilisateur;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#getIdClient()
	 */
	public Long getIdClient() {
		return idClient;
	}

	/* (non-Javadoc)
	 * @see org.acsis.jee.pojo.IClient#setIdClient(int)
	 */
	public void setIdClient(Long idClient) {
		this.idClient = idClient;
	}
	
	public Set<Trajet> getTrajets() {
		return trajets;
	}

	public void setTrajets(Set<Trajet> trajets) {
		this.trajets = trajets;
	}
	
	@Override
	public boolean equals(Object obj) {
		
		if(obj == null)
			return false;
		
		Client client = (Client) obj;
		return client.idClient == idClient;
	}
}
